import CanvasInputEvent from "./CanvasInputEvent";
import EInputEventType from "../enums/EInputEventType";

export default class CanvasKeyBoardEvent extends CanvasInputEvent {
    // 当前按下的键的ASCII字符
    public key: string;
    // 当前按下的键的ASCII码(数字)
    public keyCode: number;
    // 当前按下的键是否不停地触发事件
    public repeat: boolean;
    public constructor(type: EInputEventType, key: string, keyCode: number, repeat: boolean, altKey: boolean = false, ctrlKey: boolean = false, shiftKey: boolean = false) {
        super(type, altKey, ctrlKey, shiftKey);
        this.key = key;
        this.keyCode = keyCode;
        this.repeat = repeat;
    }
}